#!/bin/sh
#set -x
cd ../Maestro
MAESTRODIR=`pwd`
LD_LIBRARY_PATH=$MAESTRODIR/lib:/usr/openwin/lib:/usr/lib:$LD_LIBRARY_PATH
PATH=$MAESTRODIR/bin:$PATH
export MAESTRODIR LD_LIBRARY_PATH PATH HOME
/bin/rm -rf /tmp/MAEstro
/bin/mkdir /tmp/MAEstro
/bin/mkdir /tmp/MAEstro/demo
$MAESTRODIR/bin/MakeMAEstroLinks $MAESTRODIR/demo /tmp/MAEstro/demo > /dev/null
$MAESTRODIR/bin/TimeLine /tmp/MAEstro/demo/Welcome -autoPlay -autoQuit
/bin/rm -rf /tmp/MAEstro

# Here comes the killing!

pidproc() {
	pid=`/usr/bin/ps -ef |
		/usr/bin/grep $1 |
		/usr/bin/grep -v grep |
		/usr/bin/awk '{print $2}'`
}

pidproc 'QuoteMaker '
[ "$pid" != "" ] && kill $pid

pidproc 'DisplayTool '
[ "$pid" != "" ] && kill $pid

pidproc 'DTR '
[ "$pid" != "" ] && kill $pid
